<?php
/**
 * @Author: rocky
 * @Copyright: 广州拓冠科技 <http://my8m.com>
 * Date: 2019/8/29
 * Time: 10:00
 */


namespace app\shop\controller\api\v1;


use app\common\controller\BaseApiController;
use app\common\model\ShopCouponRecord;
use app\shop\resource\CouponResoure;

/**
 * 优惠券管理
 * Class Coupon
 * @package app\shop\controller\api\v1
 */
class Coupon extends BaseApiController
{

    //我的优惠券
    public function getInfo()
    {
        $data = ShopCouponRecord::uid()->where('status',1)->with(['coupon','coupon.store'])->pages()->select();
        $this->successCode(CouponResoure::collection($data));
    }
}